home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
- MDFLIB
- Version 1.20
-
- (C) 1994/95 Maurizio Giunti
-
-
- C++ library to apply *.MDF patch files produced with a REGISTERED
- copy of MDIFF/MDIFF2. Both Dos and OS/2 2.xx 32bits verions.
- MDFLIB is totally free of charge, and royalty free. Anyone can re-
- distribute MDFLIB, but only if he/she asks back no money, except
- for copy and/or shipping expenses (anyway, these expenses must be
- carefully documented). Another condition that you must follow to
- distribute it is to furnish the ORIGINAL packet always, without
- any modifications.
-
- WARNING:
- MDFLIB will work ONLY on *.MDF files produced with a REGISTERED
- copy of MDIFF/MDIFF2.
-
-
- MPatch class
- To use this class is not important to know how it operates or what
- it contains; but is very important understand how its public
- members operate.
-
- MPatch()
- MPatch() is the class constructor. Its function is to initialize
- private data.
-
- void SetRate(short r)
- SetRate() changes the frequency of calling of Show().
-
- short MDFPatch(char *dif, char *old, char *new)
- This is the main function. Its parameters are the name of .MDF
- file, the name of the file to patch and the name of the fito it
- must create.Warning: old and new must not contain equal strings.
- If old and new are empty strings ("\0") MDFPatch() will use the
- names contained in the .MDF file. The function must return 0 or,
- in case of error a non-0 value. Please, see later for details.
-
- char *LastError()
- If there was errors in using MDFPatch() function, LastError()
- will return a pointer to a string that explain the error.
-
- void Show_start()
- void Show()
- void Show_end()
- These 3 functions are useful to show messages during patch
- application. Show_start() will be automatically called from
- MDFPatch() before to start in applying the patch. In the same way,
- Show_end() will be called at the end of the process. Show() is
- called during the process at a frequency dependent from the value
- setted with SetRate().These 3 functions are virtual, so you must
- inherit MPatch class to change them. See the SAMPLE.CPP for more
- details.
-
-
-
-
-
-
- Error table
- MDFPatch() returns values are defined as follows:
-
- Numeric Alphabetic string
- code
- 0 "OK!"
- 1 "Out of memory !"
- 2 "Can't open MDF file !"
- 3 "Invalid MDF file !"
- 4 "MDF file version mismatch !"
- 5 "UNREGISTERED !"
- 6 "Bad or incorrect OLD file !"
- 7 "Can't open OLD file !"
- 8 "Can't create NEW file !"
- 9 "General failure: NEW file corrupted !"
- 10 "OLD and NEW can't be the same file !"
-
-
-
- For any question you can contact me at:
-
- My home address:
- Maurizio Giunti
- Via G.B. Foggini, 24
- 50142 Firenze
- Italy
-
- My E-Mail address:
- 2:332/102.3@fidonet.org